class WorldState
{
  private boolean m_fAttracting;
  private boolean m_fRepelling;
  private boolean m_fLeaveTrail;
  private boolean m_fCentering;
  private boolean m_fRandom;
  private boolean m_fVelocityMatch;
  private boolean m_fCollision;
  private boolean m_fPaused;
  private boolean m_fToggleTracePath;
  
  public WorldState()
  {
    m_fAttracting = false;
    m_fRepelling = false;
    m_fLeaveTrail = false;
    //m_fCentering = true;
    //m_fRandom = true;
    m_fVelocityMatch = true;
    m_fCollision = true;
    m_fPaused = false;
    
    m_fCentering = true;
    m_fRandom = false;
    m_fVelocityMatch = false;
    m_fCollision = false;    
  }
  
  public boolean fAttract()
  {
    return m_fAttracting;
  }
  
  public boolean fRepel()
  {
    return m_fRepelling;
  }
  
  public boolean fLeaveTrail()
  {
    return m_fLeaveTrail;
  }
  
  public boolean fCentering()
  {
    return m_fCentering;
  }
  
  public boolean fRandom()
  {
    return m_fRandom;
  }
  
  public boolean fVelocityMatch()
  {
    return m_fVelocityMatch;
  }
  
  public boolean fCollision()
  {
    return m_fCollision;
  }
  
  public boolean fPaused()
  {
    return m_fPaused;
  }
  
  public void toggleAttract()
  {
    m_fAttracting = !m_fAttracting;
    if (m_fAttracting && m_fRepelling)
    {
      m_fRepelling = false;
    }
  }
  
  public void togglePause()
  {
    m_fPaused = !m_fPaused;
  }
  
  public void toggleRepel()
  {
    m_fRepelling = !m_fRepelling;
    if (m_fRepelling && m_fAttracting)
    {
      m_fAttracting = false;
    }
  }
  
  public void toggleLeaveTrail()
  {
    m_fLeaveTrail = !m_fLeaveTrail;
  }
  
  public void toggleCenter()
  {
    m_fCentering = !m_fCentering;
  }
  
  public void toggleRandom()
  {
    m_fRandom = !m_fRandom;
  }
  
  public void toggleVelocityMatch()
  {
    m_fVelocityMatch = !m_fVelocityMatch;
  }
  
  public void toggleCollision()
  {
    m_fCollision = !m_fCollision;
  }
}

